monthbig=31
monthsmall=30
big=[1,3,5,7,8,10,12]
small=[4,6,9,11]
year,month,days=input().split()
year,month,days=int(year),int(month),int(days)
if year%4==0 and year%100!=0 or year%400==0:
    month_2=29
    day_all=366
else:
    month_2=28
    day_all=365
day_a=days
for i in range(1,month):
    if i in big:
        day_a=day_a+monthbig
    elif i in small:
        day_a=day_a+monthsmall
    else:
        day_a=day_a+month_2
print(day_a)
print(f'{day_a/day_all*100:.2f}'+'%')
